Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpherePad for equi2cube + cache for create_equi_grid and create_normalized_grid #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

antoine-scenario
Copy link

2 new contributions:

[Feature] - SpherePad feature for equi2cube

Implements Bifuse SpherePad for equi2cube transform.
Usage:

equilib.equi2cube(equi, ..., pad=pad)

with pad a float between 0 (no overlap) and 1 (overlap with the entire adjacent faces).

[Optimization] - Cache for create_equi_grid and create_normalized_grid

When calling cube2equi or equi2equi on loop with the same input and ouptut dimensions, grid computation is done once for all, which saves a lot of time.

@haruishi43
Copy link
Owner

@antoine-scenario looks good!
Just one thing. It seems that functools.cache was introduced prior to python 3.9, so the library fails for 3.8.
Do you know/see if functools.cache has significant improvements over functools.lru_cache?
If you think we should move on to cache, I might want to create a wrapper around cache and lru_cache inside equilib.utils so we can automatically detect the python version and use the best caching function.

@haruishi43 haruishi43 self-requested a review June 11, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants